package com.UnionPayCenter.mapper;


import com.UnionPayCenter.account.entity.ChargeBill;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ChargeBillMapper {

    int insert(ChargeBill record);

    ChargeBill selectByPrimaryKey(Long id);

    /**
     * 统计金额总数
     *
     * @param chargeBill 查询条件
     * @return
     */
    Long sumAmount(ChargeBill chargeBill);

    List<ChargeBill> selectBySn(@Param("sn") String sn);

    List<ChargeBill> selectByCondition(ChargeBill chargeBill);

    int updateByPrimaryKeySelective(ChargeBill record);

    int updateThirdSn(@Param("sn") String sn, @Param("thirdSn") String thirdSn);

    int cas(@Param("sn") String sn, @Param("field") String field, @Param("expect") Integer expect,
            @Param("value") Integer value);
}